<template>
  <div class="weather-container">
    <div class="chart" id="he-plugin-standard"></div>
  </div>
</template>
<script>
export default {
  name: "weather",
  data() {
    return {};
  },
  mounted() {
    window.WIDGET = {
      CONFIG: {
        // layout: "1",
        flex: "1",
        width: "380",
        height: "200",
        background: "5",
        dataColor: "FFFFFF",
        key: "f1716307f27c44b69e1c178494a34f62",
      },
    };
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src =
      "https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0";
    document.getElementsByTagName("head")[0].appendChild(script);
  },
};
</script>

<style lang="scss" scoped>
.weather-container {
  .chart {
    height: 3rem;
  }
}
</style>
